<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: ipad</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: ipad</td>
      <td class="subheader-left"><a href="matlab:open ipad">View code for ipad</a></td>
    </tr>
  </table>
<h1>ipad</h1><p><span class="helptopic">Pad an image with constants</span></p><strong>out</strong> = <span style="color:red>ipad</span>(<strong>im</strong>, <strong>sides</strong>, <strong>n</strong>) is a padded version of the image <strong>im</strong> with a block
of NaN values <strong>n</strong> pixels wide on the sides of <strong>im</strong> as specified by <strong>sides</strong> which
is a string containing one or more of the characters:

<table class="list">
  <tr><td style="white-space: nowrap;" class="col1"> 't'</td> <td>top</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'b'</td> <td>bottom</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'l'</td> <td>left</td></tr>
  <tr><td style="white-space: nowrap;" class="col1"> 'r'</td> <td>right</td></tr>
</table>
<strong>out</strong> = <span style="color:red>ipad</span>(<strong>im</strong>, <strong>sides</strong>, <strong>n</strong>, <strong>v</strong>) as above but pads with pixels of value <strong>v</strong>.

<h2>Examples</h2>
Add a band of zero pixels 20 pixels high across the top of the image:

<pre style="width: 90%%;" class="examples">
ipad(im,&nbsp;'t',&nbsp;20,&nbsp;0)
</pre>
Add a band of white pixels 10 pixels wide on all sides of the image:

<pre style="width: 90%%;" class="examples">
ipad(im,&nbsp;'tblr',&nbsp;10,&nbsp;255)
</pre>
<h2>Notes</h2>
<ul>
  <li>Not a tablet computer.</li>
</ul>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2011 Peter Corke.</p>
</body></html>